package com.cdm.persistence;

import net.sf.commons.data.validator.ValidateNumber;
import net.sf.commons.data.validator.ValidateString;
import net.sf.frails.bean.annotations.DefValidator;
import net.sf.frails.bean.validator.BeanValidator;
import net.sf.frails.bean.validator.Field;

@DefValidator(id = "userValidator")
@BeanValidator(name = "userValidator", targetType = User.class, fields = {
        @Field(name = "userId", required = true, validateNumber = @ValidateNumber(validatorMessage = "asssssssssssssss", message = "eeeeeee")),
        @Field(name = "userName", required = false, validateString = @ValidateString(validatorMessage = "error.age.range", message = "error.age")),
        @Field(name = "password", required = false, validateString = @ValidateString(minLen = 4, validatorMessage = "validte_error_password_length")) })
public class UserValidator {
}
